<?php
/**
 * 好小一个更新RSS
 * @author xnny
 * @version 1.0
 */

include 'include.php';
include 'config.php';
set_time_limit(0);

$feed = isset($_GET['rss']) ? $_GET['rss'] : die('输入源');
$RSS = wt_xml::readRSS($feed);

foreach (array_reverse($RSS['post']) as $v)
{
	if (wt_xml::getLastUpdate($feed) < strtotime($v['pubDate']))
	{
		$BID = wt_xml::getBlogID($feed);
		wt_xml::addPost($v, $BID);
	}
}